/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package jpa.entity;

import java.io.Serializable;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.SequenceGenerator;

/**
 *
 * @author isaias
 */
@Entity
public class EmailParams implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @SequenceGenerator(name = "emailParams_gen", sequenceName = "emailParams_id_seq", allocationSize = 1)
    @GeneratedValue(generator = "emailParams_gen")
    @Column(name = "id")
    private Long id;
    private String email;
    private String nome;
    private String smtp_server;
    private String direct_link;
    private boolean SSL;
    private boolean TLS;
    private int smtp_port;
    private String password;

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public boolean isSSL() {
        return SSL;
    }

    public void setSSL(boolean SSL) {
        this.SSL = SSL;
    }

    public boolean isTLS() {
        return TLS;
    }

    public void setTLS(boolean TLS) {
        this.TLS = TLS;
    }

    public String getDirect_link() {
        return direct_link;
    }

    public void setDirect_link(String direct_link) {
        this.direct_link = direct_link;
    }

    public String getEmail() {
        return email;
    }

    public void setEmail(String email) {
        this.email = email;
    }

    public String getNome() {
        return nome;
    }

    public void setNome(String nome) {
        this.nome = nome;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public int getSmtp_port() {
        return smtp_port;
    }

    public void setSmtp_port(int smtp_port) {
        this.smtp_port = smtp_port;
    }

    public String getSmtp_server() {
        return smtp_server;
    }

    public void setSmtp_server(String smtp_server) {
        this.smtp_server = smtp_server;
    }
    
    @Override
    public int hashCode() {
        int hash = 0;
        hash += (id != null ? id.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof EmailParams)) {
            return false;
        }
        EmailParams other = (EmailParams) object;
        if ((this.id == null && other.id != null) || (this.id != null && !this.id.equals(other.id))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "jpa.entity.EmailParams[id=" + id + "]";
    }

}
